test(cli-e2e): use shared runCli helper from @inquirerer/test#33
Merged
pyramation merged 2 commits intomainfrom Apr 26, 2026
Merged
test(cli-e2e): use shared runCli helper from @inquirerer/test#33pyramation merged 2 commits intomainfrom
pyramation merged 2 commits intomainfrom
Conversation
Replaces the hand-rolled runCli + parseArgs (~75 lines) with a thin wrapper around runCli + parseArgString from @inquirerer/test. The shared helper provides identical semantics: spawn, capture stdout/stderr, enforce a timeout, reject on non-zero exit code with stdout/stderr attached to the error. The local function keeps its (args: string, options) signature and returns Promise<string> so all 14 call sites are unchanged — it just delegates to the upstream helper for the actual subprocess management. NOTE: Blocked on constructive-io/dev-utils#79 + a publish of @inquirerer/test (the runCli/parseArgString exports first appear in 1.4.0). This PR is filed as a draft so it can be reviewed in advance.
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the hand-rolled
runCli+parseArgsincli-e2e.test.ts(~75 lines ofchild_process.spawnplumbing, timeout handling, and quote-aware arg parsing) with a thin wrapper aroundrunCli+parseArgStringfrom@inquirerer/test. The upstream helper provides identical semantics:spawnwith piped stdioThe local
runCli(args, options)keeps its existingPromise<string>signature so all 14 call sites in this file are unchanged — it just delegates the subprocess management to the upstream helper.Net diff: +25 / −75.
Review & Testing Checklist for Human
runCliandparseArgStringexports first appear in@inquirerer/test@1.4.x; current latest on npm is1.3.5. This PR is filed as draft so it can be reviewed alongsideconstructive-io/dev-utils#79; promote out of draft once@inquirerer/test@1.4.0(or whatever Lerna picks) is on npm andpnpm installresolves the new version.pnpm --filter @agentic-db/cli-e2e-tests testend-to-end against a Dockerconstructiveio/postgres-plus:18+ Ollama (withnomic-embed-textpulled). All 18 tests should still pass — the harness change is non-behavioral but the subprocess surface is the kind of thing that benefits from a real run.RunCliErrorattaches.stdout,.stderr,.exitCode, etc. but stringifies similarly to the previous hand-rolledError).Notes
Companion PRs:
constructive-io/dev-utils#79— addsrunCli+parseArgStringto@inquirerer/test, plus a Testing section in inquirerer's main README pointing at the package. Must merge + publish first.constructive-io/constructive#1027— drops the local re-export indirection inpackages/cli/test-utilsand imports directly from@inquirerer/test. Independent of this PR.The intent across all three is to make
@inquirerer/testthe canonical place for both in-process Inquirerer testing (createTestEnvironment,setupTests,KEY_SEQUENCES) and out-of-process CLI E2E testing (runCli,parseArgString), so future tests don't have to re-roll the same harness patterns.Link to Devin session: https://app.devin.ai/sessions/81001448b7c54b8099437f706d44a30d
Requested by: @pyramation